projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1dc36d
)
Remove an unnecessary check
author
Matthias Clasen
<mclasen@redhat.com>
Wed, 11 Jan 2017 00:53:08 +0000
(19:53 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Wed, 11 Jan 2017 00:56:21 +0000
(19:56 -0500)
Since the demise of theme engines, we can no longer hit
the case of id >= GTK_CSS_PROPERTY_N_PROPERTIES. So don't
check for this in a very frequently called function.
gtk/gtkcssstaticstyle.c
patch
|
blob
|
history
diff --git
a/gtk/gtkcssstaticstyle.c
b/gtk/gtkcssstaticstyle.c
index 1d4940258fa4370ae5b8cd426075745afe18010f..217bb06265739909a83005052849600fd36b3379 100644
(file)
--- a/
gtk/gtkcssstaticstyle.c
+++ b/
gtk/gtkcssstaticstyle.c
@@
-46,13
+46,6
@@
gtk_css_static_style_get_value (GtkCssStyle *style,
{
GtkCssStaticStyle *sstyle = GTK_CSS_STATIC_STYLE (style);
- if (G_UNLIKELY (id >= GTK_CSS_PROPERTY_N_PROPERTIES))
- {
- GtkCssStyleProperty *prop = _gtk_css_style_property_lookup_by_id (id);
-
- return _gtk_css_style_property_get_initial_value (prop);
- }
-
return sstyle->values[id];
}